import * as types from "./mutation-types";

const mutations = {
  [types.LOGIN_IN]({commit}, {api_token, userinfo}) {
    // 用户信息
    commit(types.SET_USERINFO, userinfo)
    // token
    commit(types.SET_TOKEN, api_token);
    // token
    commit(types.SET_AUTH, userinfo.avatar && userinfo.tel && userinfo.nickname);
  }
};

export default mutations;